Sugar Potentiometer
The potentiometer contains an adjustable resistor. By rotating the knob, the resistance value is changed, thereby controlling the output voltage. Its adjustable angle range corresponds to the return value, making it suitable for applications such as adjusting light brightness or servo angles. The output is an analog value.
Parameters
| Size | 24 x 24 x 30 mm |
|---|---|
| Weight | 6.7 g |
| Signal | Analog Input |
| Range | 0~3.3V Corresponds to Micro:bit 0~1023 |
| Adjustable Angle | 270° |
Wiring
Connect the light sensor module to P1 on the Robotbit Edu using a 3-pin terminal cable.
(Only P0, P1, and P2 pins can be used, as they support analog read functionality.)
After turning on the Robotbit power, you will see the red light at the bottom of the light sensor module illuminate (indicating the module is powered normally).)

Programming
#Potentiometer controls the number of lit
Rotate the potentiometer, and the number of lit LEDs on the Micro:bit's dot matrix will increase accordingly.
Here, an advanced operation block 【Mapping】 is used:

